package top.xana.acg.anime.inject

import com.google.gson.Gson
import com.google.gson.GsonBuilder
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

/**
 * @author xana
 * @date 2023/4/4 0004 11:14
 * @email cv4096@qq.com
 **/

@Module
@InstallIn(SingletonComponent::class)
object SerializeModule {
    @Provides
    @Singleton
    fun provideGson(): Gson {
        return GsonBuilder()
            .setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")
            //.setExclusionStrategies(new DBFlowExclusionStrategy())
            .setLenient()
            .create()
    }

}